﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NPipeline.Event;

namespace NPipeline
{
    public interface IStageContext
    {
        /// <summary>
        /// change this to events ???
        /// </summary>
        /// <param name="listener"></param>
        // public void RegisterListener(StageEventListener listener);

        /// <summary>
        /// change this to events and properties ???
        /// </summary>
        /// <returns></returns>
        // public List<StageEventListener> getRegistersListeners();

        

        // define events for StageEvents and StageErrorEvents
        event StageEventHandler StageEvent;
        event StageErrorEventHandler StageErrorEvent;

        void RaiseStageEvent(StageEventArgs e);
        void RaiseStageErrorEvent(StageErrorEventArgs e);

        IFeeder getBranchFeeder(String branch);
        IFeeder getDownstreamFeeder(IStage stage);
        IStageDriver getStageDriver(IStage stage);

        /// <summary>
        /// this should be a propery also ....
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        object Env { get; }

    }
}
